package cn.qiao.demo.abstractFactory.factory;

/**
 * desc:
 *
 * @author qiao
 * @date 2022年04月20日 15:51
 */
public class FactoryProduct {

    public static AbstractFactory getFactory(String factoryName) {
        if ("ColorFactory".equals(factoryName)) {
            return new ColorFactory();
        }
        if ("ShapeFactory".equals(factoryName)) {
            return new ShapeFactory();
        }
        return null;
    }

}
